// 药品分类类型
export type MedicineCategory = {
  id: number
  name: string
  description?: string
}

// 药品状态枚举
export enum MedicineStatus {
  Normal = 'normal',
  Expired = 'expired',
  NearExpiry = 'nearExpiry'
}

// 药品用量周期类型
export type DosagePeriod = {
  period: string // 周期（每天/每周/每月）
  amount: number // 用量
}

// 药品基本信息类型
export type Medicine = {
  id: number
  name: string
  imageUrl?: string
  frontImage?: string
  backImage?: string
  efficacy?: string
  symptoms?: string
  dosage?: DosagePeriod
  category?: MedicineCategory
  productionDate?: Date
  expiryDate?: Date
  status: MedicineStatus
  description?: string
  specification?: string // 规格，如：'10片/盒'
  remainingQuantity?: number // 剩余数量
}

// 聊天消息类型
export type ChatMessage = {
  type: 'user' | 'ai'
  content: string
}

// 用户信息类型
export type UserInfo = {
  id: number
  nickname: string
  avatar?: string
  birthday?: Date
  reminderTimes?: {
    morning?: string
    noon?: string
    evening?: string
  }
}

// 药品关系图谱类型
export type MedicineRelation = {
  source: number // 源药品ID
  target: number // 目标药品ID
  relation: string // 关系描述
}

// 用药提醒类型
export type MedicineReminder = {
  id: number
  medicineId: number
  scheduledTime: Date
  status: 'pending' | 'completed' | 'missed'
  dosage: number
}

// 聊天消息类型
export type ChatMessage = {
  type: 'user' | 'ai'
  content: string
}